package com.yellowcong;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

import com.yellowcong.filter.TokenFilter;

@SpringBootApplication
@EnableDiscoveryClient
//配置@EnableZuulProxy 注解 ，让动态路由生效
@EnableZuulProxy
public class ConfigMain {

	public static void main(String[] args) {
		SpringApplication.run(ConfigMain.class, args);
	}

	/**
	 * 创建日期:2018年3月16日<br/>
	 * 创建用户:yellowcong<br/>
	 * 功能描述:注册过滤器
	 * @return
	 */
    @Bean
    public TokenFilter getZuulFilter(){
        return new TokenFilter();
    }
}
